<?php
namespace dk\traits;

trait Singleton {
    protected static $instance;
    /**
    * @return Base
    */
    public static function &getInstance() {
        if (!isset(static::$instance)) {
            self::$instance = new static();
        }
     
        return static::$instance;
    }
}